package com.ncst.backend.controller;

import com.ncst.backend.common.Result;
import com.ncst.backend.domain.vo.FeeGetVo;
import com.ncst.backend.service.PrescriptionService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "费用查询")
@Slf4j
@RestController
@RequestMapping("/fee")
public class FeeGetController {

    @Autowired
    private PrescriptionService prescriptionService;

    @GetMapping("/get")
    public Result<List<FeeGetVo>> getAll(Integer registerId){
        List<FeeGetVo> list = prescriptionService.getFeeByRegisterId(registerId);
        return Result.success(list);
    }
}
